From 5cab69c207f61326bfc37af0896f8291c178ae53 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Fri, 4 Aug 2017 21:27:26 -0700 Subject: [PATCH] improve misleading error message --- src/cargo/core/summary.rs | 4 ++-- tests/features.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cargo/core/summary.rs b/src/cargo/core/summary.rs index 9fdc326b8..9902311e6 100644 --- a/src/cargo/core/summary.rs +++ b/src/cargo/core/summary.rs @@ -53,8 +53,8 @@ impl Summary { feature, dep) } None if is_reexport => { - bail!("Feature `{}` requires `{}` which is not an \ - optional dependency", feature, dep) + bail!("Feature `{}` requires a feature of `{}` which is not a \ + dependency", feature, dep) } None => { bail!("Feature `{}` includes `{}` which is neither \ diff --git a/tests/features.rs b/tests/features.rs index 629bea34a..44cbf9610 100644 --- a/tests/features.rs +++ b/tests/features.rs @@ -169,7 +169,7 @@ fn invalid6() { [ERROR] failed to parse manifest at `[..]` Caused by: - Feature `foo` requires `bar` which is not an optional dependency + Feature `foo` requires a feature of `bar` which is not a dependency ")); } @@ -193,7 +193,7 @@ fn invalid7() { [ERROR] failed to parse manifest at `[..]` Caused by: - Feature `foo` requires `bar` which is not an optional dependency + Feature `foo` requires a feature of `bar` which is not a dependency ")); } -- 2.30.2